package com.stream.service.impl;

import com.stream.model.entity.SysLogEntity;
import com.stream.repository.SysLogRepository;
import com.stream.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 日志查询服务
 * Created by yebaokang on 2017/5/22.
 */

@Service("sysLogService")
public class SysLogServiceImpl implements SysLogService {

    //加这个注解让IDE 不报: Could not autowire
    @SuppressWarnings("SpringJavaAutowiringInspection")
    @Autowired
    private SysLogRepository sysLogRepository;

    @Override
    public SysLogEntity queryObject(Long id) {
        return sysLogRepository.queryObject(id);
    }

    @Override
    public List<SysLogEntity> queryList(Map<String, Object> map) {
        return  sysLogRepository.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return sysLogRepository.queryTotal(map);
    }

    @Override
    public void save(SysLogEntity sysLog) {
        sysLogRepository.save(sysLog);
    }

    @Override
    public void update(SysLogEntity sysLog) {
        sysLogRepository.update(sysLog);
    }

    @Override
    public void delete(Long id) {
        sysLogRepository.delete(id);
    }

    @Override
    public void deleteBatch(Long[] ids) {
        sysLogRepository.deleteBatch(ids);
    }
}
